home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 3050 < prev    next >
Encoding:
Text File  |  1996-08-05  |  937 b   |  35 lines

  1. Newsgroups: comp.lang.c
  2. Path: gail.ripco.com!mambuhl
  3. From: mambuhl@ripco.com (Martin Ambuhl)
  4. Subject: Re: localtime            
  5. X-Nntp-Posting-Host: foley.ripco.com
  6. Message-ID: <DLr4CB.8uv@rci.ripco.com>
  7. Sender: usenet@rci.ripco.com (Net News Admin)
  8. Organization: Ripco Internet BBS Chicago
  9. Date: Thu, 25 Jan 1996 19:19:22 GMT
  10. X-Ident-Sender: mambuhl
  11.  
  12. wsog@softsite.co.at (Walter Sommergruber)
  13. in <61VnNPt6nTB@softsite.co.at> asks:
  14.  
  15. >In ANSI C the function localtime returns a pointer to a struct tm.
  16. >The documentation of my compiler says
  17. >"tm.tm_year = Year (current year minus 1900)"
  18.  
  19. >Is this defined behaviour ?
  20.  
  21. Yes.  See ISO/ANSI 7.12.1
  22.  
  23. >Can I assume "tm_year+1900 = real year" will work also after the
  24. >year 2000 ? ...
  25.  
  26. Yes
  27. >... Or is this compiler dependend ?
  28.  
  29. Only if the compiler (actually library) is broken.
  30.  
  31.                                          
  32. --
  33. * Martin Ambuhl       net: mambuhl@ripco.com
  34. * Chicago, IL (USA)    
  35.